<div id="content" class="hfeed">
    <div class="page hentry entry">
        <div class="post-wrap">
            <div class="entry-content">

                <h2>View</h2>
                <dl>
                		<dt><?php echo __('Id'); ?></dt>
                		<dd>
                			<?php echo h($sale['Sale']['id']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Customer'); ?></dt>
                		<dd>
                			<?php echo $this->Html->link($sale['Customer']['id'], array('controller' => 'customers', 'action' => 'view', $sale['Customer']['id'])); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Employee'); ?></dt>
                		<dd>
                			<?php echo $this->Html->link($sale['Employee']['id'], array('controller' => 'employees', 'action' => 'view', $sale['Employee']['id'])); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Date Sell'); ?></dt>
                		<dd>
                			<?php echo h($sale['Sale']['date_sell']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Subtotal'); ?></dt>
                		<dd>
                			<?php echo h($sale['Sale']['subtotal']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Discount For Buyer'); ?></dt>
                		<dd>
                			<?php echo h($sale['Sale']['discount_for_buyer']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Total'); ?></dt>
                		<dd>
                			<?php echo h($sale['Sale']['total']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Sales Description'); ?></dt>
                		<dd>
                			<?php echo h($sale['Sale']['sales_description']); ?>
                			&nbsp;
                		</dd>
                	</dl>

                <div class="related">
                	<h2><?php echo __('Related Sale Detail'); ?></h2>
                	<?php if (!empty($sales['SalesDetail'])): ?>
                	<table cellpadding = "0" cellspacing = "0">
                	<tr>
                		<th><?php echo __('Mobile Model Id'); ?></th>
                		<th><?php echo __('Quantity'); ?></th>
                		<th><?php echo __('Price'); ?></th>
                		<th><?php echo __('Total'); ?></th>
                		<th class="actions"><?php echo __('Actions'); ?></th>
                	</tr>
                	<?php foreach ($sales['SalesDetail'] as $salesDetail): ?>
                		<tr>
                			<td><?php echo salesDetail['modell_id']; ?></td>
                			<td><?php echo salesDetail['quantity']; ?></td>
                			<td><?php echo salesDetail['price']; ?></td>
                			<td><?php echo salesDetail['total']; ?></td>
                			<td class="actions">
                				<?php echo $this->Html->link(__('View'), array('controller' => 'sales_details', 'action' => 'view', $salesDetail['id'])); ?>
                				<?php echo $this->Html->link(__('Edit'), array('controller' => 'sales_details', 'action' => 'edit', $salesDetail['id'])); ?>
                				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'sales_details', 'action' => 'delete', $salesDetail['id']), array(), __('Are you sure you want to delete # %s?', $salesDetail['id'])); ?>
                			</td>
                		</tr>
                	<?php endforeach; ?>
                	</table>
                <?php endif; ?>

                	<div class="actions">
                		<ul>
                			<li><?php echo $this->Html->link(__('New Sales Detail'), array('controller' => 'sales_details', 'action' => 'add')); ?> </li>
                		</ul>
                	</div>
                </div>




            </div>
        </div>
    </div>
</div>
<div id="sidebar" class="sidebar">
    <div class="widget">
        <h4>Function</h4>
        <ul class="menu">
          <li><?php echo $this->Html->link(__('Edit Sale'), array('action' => 'edit', $sale['Sale']['id'])); ?> </li>
          		<li><?php echo $this->Form->postLink(__('Delete Sale'), array('action' => 'delete', $sale['Sale']['id']), array(), __('Are you sure you want to delete # %s?', $sale['Sale']['id'])); ?> </li>
          		<li><?php echo $this->Html->link(__('List Sales'), array('action' => 'index')); ?> </li>
          		<li><?php echo $this->Html->link(__('New Sale'), array('action' => 'add')); ?> </li>
            		<li><?php echo $this->Html->link(__('New Sale Detail'), array('controller' => 'sales_details', 'action' => 'add')); ?> </li>
        </ul>
    </div>
</div>





<div class="sales view">
<h2><?php echo __('Sale'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Customer'); ?></dt>
		<dd>
			<?php echo $this->Html->link($sale['Customer']['id'], array('controller' => 'customers', 'action' => 'view', $sale['Customer']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Employee'); ?></dt>
		<dd>
			<?php echo $this->Html->link($sale['Employee']['id'], array('controller' => 'employees', 'action' => 'view', $sale['Employee']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Date Sell'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['date_sell']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Subtotal'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['subtotal']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Discount For Buyer'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['discount_for_buyer']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Total'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['total']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Sales Description'); ?></dt>
		<dd>
			<?php echo h($sale['Sale']['sales_description']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Sale'), array('action' => 'edit', $sale['Sale']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Sale'), array('action' => 'delete', $sale['Sale']['id']), array(), __('Are you sure you want to delete # %s?', $sale['Sale']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Sales'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Sale'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Customers'), array('controller' => 'customers', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Customer'), array('controller' => 'customers', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Employees'), array('controller' => 'employees', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Employee'), array('controller' => 'employees', 'action' => 'add')); ?> </li>
	</ul>
</div>
